#pragma strict

/** 确保AudioSource存在  */
static function MakeSureAudioSource(go:GameObject){
	if(! go.audio)
		go.AddComponent.<AudioSource>();
}

static function PlayOneShot(go:GameObject,clip:AudioClip){
	if(clip){
		MakeSureAudioSource(go);
		if(go.audio)
			go.audio.PlayOneShot(clip);
	}
}